aux_source_directory (base BASE_DIR)
aux_source_directory (net NET_DIR)
aux_source_directory (MyRpc RPC_DIR)
aux_source_directory (util UTIL_DIR)

include_directories(.)
include_directories(${JSONCPP_INCLUDE_DIR})
set(UTIL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp/include" CACHE INTERNAL "jsoncpp_include")
add_library (MyRpc STATIC ${BASE_DIR} ${NET_DIR} ${RPC_DIR} ${UTIL_DIR})

target_link_libraries(MyRpc pthread)
target_link_libraries(MyRpc jsoncpp_static)

add_subdirectory(test)